home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 14 / 014.d81 / sprite editor (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  185 lines

  1. 5 poke53281,15:poke53280,0
  2. 6 printchr$(142)"[147][144]         **sprite editor v1**":print"                 by"
  3. 7 print"               tomar"
  4. 8 print"    loadstar is not public domain."
  5. 9 print"  please respect the author's rights."
  6. 10 print"        hit any key to start....."
  7. 12 poke198,0:wait198,1:poke198,0
  8. 15 dimsp(63):sc=55336:sc%=0:cx=0:sp=1064
  9. 20 rem sprite editor
  10. 30 rem
  11. 31 print"[147]command: l[146]oad s[146]ave edit h[146]elp q[146]uit "
  12. 32 fori=1043to1046:poke54272+i,0:nexti
  13. 35 print"      sprite editor            data         [146]":u$="[145]"
  14. 42 fori=1to21
  15. 43 i$=str$(i):l=len(i$)-1:i$=mid$(i$,2,l)
  16. 44 printu$"[186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][186][144]"i$:printtab(28)"[145] 0,0,0"
  17. 45 u$="":nexti
  18. 46 print"";:printtab(25)"[207][163][163][208]"
  19. 47 printtab(25)"[180]  [167]"
  20. 48 printtab(25)"[204][164][164][186]"
  21. 49 print"[144]123456789111111111122222 row 7  col 10 [146]"
  22. 50 print"[144]         012345678901234              [145]"
  23. 60 fori=1043to1046:poke54272+i,0:nexti
  24. 100 gosub3000
  25. 110 rem
  26. 130 gosub3050:c%=(x-24)/8+1
  27. 140 r%=(y-44)/8-1
  28. 150 d=1064+(r%*40)+c%-1
  29. 160 p=55336+(r%*40)+c%-1
  30. 170 ifpeek(d)=160thenpokep,1:poked,122:goto180
  31. 175 pokep,3:poked,160:sw=0
  32. 180 ifc%<9thenxx=2^((8-c%)*1):t=1+(r%-1)*3:goto183
  33. 181 ifc%<17thenxx=2^((16-c%)*1):t=2+(r%-1)*3:goto183
  34. 182 xx=2^((24-c%)*1):t=3+(r%-1)*3
  35. 183 ifpeek(d)=122thenxx=xx*(-1)
  36. 184 sp(t)=sp(t)+xx:t1=sp((r%*3)-2):t2=sp((r%*3)-1):t3=sp(r%*3)
  37. 185 d$="":fork=1tor%:d$=d$+"":nextk
  38. 186 t1$=str$(t1):t2$=str$(t2):t3$=str$(t3)
  39. 187 printd$"           ";
  40. 189 print"[145]"mid$(t1$,2,len(t1$))",";
  41. 190 printmid$(t2$,2,len(t2$))",";
  42. 191 printmid$(t3$,2,len(t3$))
  43. 192 ifc%<9thenpoke896+(r%-1)*3+(c%-1)/8,t1:goto110
  44. 193 ifc%<17thenpoke896+(r%-1)*3+(c%-1)/8,t2:goto110
  45. 194 poke896+(r%-1)*3+(c%-1)/8,t3
  46. 195 goto110
  47. 3000 rem
  48. 3010 rem arrow  pointer
  49. 3020 rem
  50. 3030 v=53248:pokev+21,12:poke2042,13:x=99:y=108:poke2043,14:pokev+41,0
  51. 3031 pokev+42,0:forn=0to62:readq:poke832+n,q:next:pokev+4,99:pokev+5,108
  52. 3040 forn=0to62:poke896+n,0:next:pokev+6,229:pokev+7,76:return
  53. 3041 data 0,0,0,0,0,0,0,0,0,1,0,0,7,0,0,14,0,0,28,0,0,120,0,0
  54. 3042 data 224,0,0,255,255,255,96,0,0,56,0,0,28,0,0,14,0,0,7,0,0,1,0,0
  55. 3043 data 0,0,0,0,0,0,0,0,0
  56. 3044 data 0,0,0,0,0,0,0,0,0
  57. 3045 data 0,0,0,0,0,0,0,0,0
  58. 3046 data 0,0,0,0,0,0,0,0,0
  59. 3047 data 0,0,0,0,0,0,0,0,0
  60. 3050 rem
  61. 3060 rem moving finger
  62. 3065 getc$:pk=peek(56320)
  63. 3070 ifpeek(197)=1orpk=111thenreturn
  64. 3071 ifpeek(197)=6thenpokev+21,0:pokev+4,99:pokev+5,108:run15
  65. 3072 ifpeek(197)=3orc$="q"thenpokev+21,0:goto6000
  66. 3074 ifc$="l"orpeek(197)=4thengosub4000
  67. 3075 ifc$="s"orpeek(197)=5thengosub5010
  68. 3076 ifc$="h"thengosub7000
  69. 3077 ifpk=126orpk=119orpk=125orpk=123then3080
  70. 3078 ifc$<>""andc$<>""andc$<>"[145]"andc$<>"[157]"then3065
  71. 3080 ifc$="[145]"orpk=126thenify%>1theny=y-8
  72. 3090 ifc$=""orpk=125thenify%<21theny=y+8
  73. 3094 ifc$="[157]"orpk=123thenifx%>1thenx=x-8
  74. 3095 ifc$=""orpk=119thenifx%<24thenx=x+8
  75. 3100 pokev+4,x:pokev+5,y
  76. 3105 x%=(x-24)/8+1
  77. 3110 y%=(y-44)/8-1
  78. 3120 print""tab(25)"[145]row"y%"[157] "
  79. 3125 printtab(32)"[145]col"x%"[157] [146]"
  80. 3130 goto3065
  81. 3172 fori=1043to1046:poke54272+i,0:nexti
  82. 4000 print" l[146]oad filename->                       "
  83. 4010 print"";:inputf$
  84. 4015 print"                              "
  85. 4020 print" l[146]oading "f$""
  86. 4034 open15,8,15
  87. 4035 print#15,"i0":input#15,en$,em$,et$,es$
  88. 4036 ifen$="00"goto4040
  89. 4037 print"disk error                    ":close15:return
  90. 4040 sf$=f$:f$=f$+",s,r":open4,8,4,f$
  91. 4041 input#15,en$,em$,et$,es$
  92. 4042 ifen$="00"goto4049
  93. 4043 print" "sf$" not found return[146] to cont"
  94. 4044 getyn$:ifyn$=""then4044
  95. 4045 goto4092
  96. 4049 x1=sp+39:x2=x1+23:y1=sc+39:y2=y1+23:ct=0:sc=0:i%=0:j%=1:cd=0
  97. 4050 forw=1to63:input#4,sp(w):c=sp(w)
  98. 4060 fork=7to0step-1
  99. 4061 x1=x1+1:y1=y1+1:ifx1>x2thenx1=x1+16:x2=x1+23:y1=y1+16:y2=y2+23:goto4090
  100. 4070 x%=c-2^k:ifx%>-1thenpokex1,160:pokey1,3:c=c-2^k:goto4085
  101. 4080 pokex1,122:pokey1,1:ct=ct+1
  102. 4085 poke1044,160:r%=rnd(0)*13+1:poke55316,r%
  103. 4086 print""ct"":
  104. 4087 i%=i%+1:print""tab(25)"[145]row"j%"[157] "
  105. 4088 printtab(32)"[145]col"i%"[157] [146]"
  106. 4089 ifsc=3theni%=0:j%=j%+1
  107. 4090 ifsc=3thensc=0:print""tab(32)"[145]col 24" "
  108. 4091 [130]k:[151]896[170]cd,sp(w):cd[178]cd[170]1
  109. 4092 sc[178]sc[170]1:[130]w
  110. 4093 [153]"command: lwaitoad swaitave edit hwaitelp  qwaituit "
  111. 4094 [129]i[178]1043[164]1046:[151]54272[170]i,0:[130]i
  112. 4095 [151]198,0:c$[178]"":[160]4:[160]15
  113. 4096 [153]"":t1$[178][196](sp(1)):t2$[178][196](sp(2)):t3$[178][196](sp(3))
  114. 4097 [153][163]29)[202](t1$,2,[195](t1$));:[153]","[202](t2$,2,[195](t2$));
  115. 4098 [153]","[202](t3$,2,[195](t3$))
  116. 5000 pt[178]1:[129]i[178]4[164]63[169]3
  117. 5001 d$[178]"":[129]k[178]1[164]pt:d$[178]d$[170]"":[130]k:[153]"";:t1$[178][196](sp(i))
  118. 5003 ov$[178]"":[153]ov$d$[202](t1$,2,[195](t1$))",";
  119. 5004 t2$[178][196](sp(i[170]1)):[153][202](t2$,2,[195](t2$))",";
  120. 5005 t3$[178][196](sp(i[170]2)):[153][202](t3$,2,[195](t3$))
  121. 5009 pt[178]pt[170]1:[130]i:[142]
  122. 5010 [153]" swaitave filename->                       "
  123. 5011 [153]"";:[133]f$
  124. 5015 [153]"                              "
  125. 5020 [153]"on swaitaving "f$"on"
  126. 5034 [159]15,8,15
  127. 5035 [152]15,"io":[132]15,en$,em$,et$,es$
  128. 5036 [139]en$[178]"00"[137]5040
  129. 5037 [153]"disk error                    ":[142]
  130. 5040 sf$[178]f$:f$[178]f$[170]",s,w":[159]4,8,4,f$
  131. 5041 [132]15,en$,em$,et$,es$
  132. 5042 [139]en$[178]"00"[137]5046
  133. 5043 [153]"                         ":[153]""em$" -return for menu"
  134. 5044 [161]yn$:[139]yn$[178]""[167]5044
  135. 5045 [139]yn$[179][177]"y"[167]5070
  136. 5046 [153]"on swaitaving "sf$"            on"
  137. 5047 [160]4:f$[178]"@:"[170]f$[170]",s,w":[159]4,8,4,f$
  138. 5050 [129]w[178]1[164]63:[152]4,sp(w);[199](13)
  139. 5051 [153]""w""
  140. 5052 [151]1044,160:r%[178][187](0)[172]13[170]1:[151]55316,r%
  141. 5055 [130]w
  142. 5060 [129]i[178]1043[164]1046:[151]54272[170]i,0:[130]i
  143. 5070 [153]"command: lwaitoad swaitave edit hwaitelp qwaituit ":[151]198,0
  144. 5075 [160]4:[160]15:[142]
  145. 6000 [143]
  146. 6020 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
  147. 6030 [151]631,13:[151]632,13:[151]198,2:        [128]
  148. 7000 [143] help
  149. 7010 [153]" help-scroll w/ crsrwait keys (h to return)"
  150. 7020 [161]f$:[139]f$[178]""[167]7020
  151. 7030 [139]f$[178]"h"[167]7500
  152. 7040 [139]f$[179][177]""[167]7020
  153. 7050 [153]" function key (f1) load a file         "
  154. 7060 [161]f$:[139]f$[178]""[167]7060
  155. 7070 [139]f$[178]"h"[167]7500
  156. 7075 [139]f$[178]""[167]7010
  157. 7080 [139]f$[179][177]""[167]7060
  158. 7090 [153]" function key (f3) save a file         "
  159. 7100 [161]f$:[139]f$[178]""[167]7100
  160. 7110 [139]f$[178]"h"[167]7500
  161. 7115 [139]f$[178]""[167]7050
  162. 7120 [139]f$[179][177]""[167]7100
  163. 7130 [153]" function key (f5) clear sprite        "
  164. 7140 [161]f$:[139]f$[178]""[167]7140
  165. 7150 [139]f$[178]"h"[167]7500
  166. 7165 [139]f$[178]""[167]7090
  167. 7170 [139]f$[179][177]""[167]7140
  168. 7180 [153]" function key (f7) terminate           "
  169. 7190 [161]f$:[139]f$[178]""[167]7190
  170. 7200 [139]f$[178]"h"[167]7500
  171. 7210 [139]f$[178]""[167]7130
  172. 7215 [139]f$[179][177]""[167]7190
  173. 7216 [153]" hit returnwait to fill/unfill box       "
  174. 7220 [161]f$:[139]f$[178]""[167]7220
  175. 7230 [139]f$[178]"h"[167]7500
  176. 7240 [139]f$[178]""[167]7180
  177. 7245 [139]f$[179][177]""[167]7220
  178. 7250 [153]" crsrwait keys/joystick postion arrow    "
  179. 7260 [161]f$:[139]f$[178]""[167]7260
  180. 7270 [139]f$[178]"h"[167]7500
  181. 7280 [139]f$[178]""[167]7216
  182. 7285 [137]7260
  183. 7500 [153]"command: lwaitoad swaitave edit hwaitelp  qwaituit     "
  184. 7510 [142]
  185.